import request from '../util/httpTool'
import DeviceExplainListReq from "../req/DeviceExplainListReq";
import DeviceExplain from "../res/DeviceExplain";


const basePath = 'iot/api/v1/v1/device/explain/'

export function list(req: DeviceExplainListReq): Promise<DeviceExplain[]> {
    return new Promise<DeviceExplain[]>((resolve, reject) => {
        const res: any = request({
            url: basePath + 'list',
            method: 'post',
            data: req
        })
        res.then((data: DeviceExplain[]) => {
            resolve(data)
        }).catch((e: any) => {
            reject(e)
        })
    })
}



